\documentclass[12pt]{article}
\usepackage{calc,fancyhdr}
\usepackage[hmargin=.5in,vmargin=.75in,
            footskip=.25in,headsep=.5in-\headheight]{geometry}

% Template solution to Exercise 3.

% Common formatting macros for CSC165.
\usepackage{amsmath,amssymb}
\input{macros-165}

% Page layout: stretch text to fill up page.
\flushbottom

% Headings.
\pagestyle{fancy}
\let\headrule\empty
\let\footrule\empty
\lhead{CSC\,165\,H1S}
\chead{Homework Exercise \#\,3}
\rhead{Winter 2014}

\begin{document}

\begin{large}
  \noindent
  Name: Robert Staskiewicz \hfill CDF login name: c3staski\\[0.5cm]
  Partner: Ekam Shahi    \hfill CDF login name: c3shahie
\end{large}

\medskip

\noindent
\rule{\textwidth}{.5pt}

\subsection*{Topic: Analyzing logical statements}

\medskip

\begin{enumerate}
 
       
    % place solution to question 1 below

    \item
    The statements that we considering are:\\
    (S1)$ \equiv \exists\, x \in D,\, (P(x) \land Q(x))$, and
    \\
    (S2)$ \equiv (\exists\, x \in D,\, P(x)) \land (\exists\, x \in D,\, Q(x))$\\ \\
    let $X = \{ x_1,x_2,...\ x_n \}$ \\ 
    Suppose $x_1 \in P(x), Q(x) $ \\
    Suppose $x_2 \notin P(x)$ and $x_2 \in Q(x)$ \\\\
    If $ (\exists\, x_1 \in D,\, P(x)) \land (\exists\, x_2 \in D,\, Q(x))$\\
    Then, (S1) and (S2) is true iff $x_1 = x_2$ \\ \\
    (S1) is satisfied when x is both a P and a Q.\\
    (S2) is satisfied when there is an x is a P and an x that is a Q, but x is not necessarily both a P and a Q.
    
    % place solution to question 2 below

    \item 
    Here are the math expressions used in the statement of the problem:
    $$ 
      \begin{array}{l}
        \displaystyle{\lim_{x\rightarrow a} f(x) = L} \\[0.25cm]
        \forall\, \epsilon \in \R^{+},\, \exists\ \delta \in \R^{+},\,
          \forall\ x \in \R,\, 
            0 < | x-a | < \delta \implies | f(x) - L | < \epsilon. \\[0.25cm]
        \displaystyle{\lim_{x\rightarrow a} f(x) \ne L}\\
       \neg (\forall\, \epsilon \in \R^{+},\, \exists\ \delta \in \R^{+},\,
                  \forall\ x \in \R,\, 
                    0 < | x-a | < \delta \implies | f(x) - L | < \epsilon.) \\
		\exists\, \epsilon \in \R^{+},\, \forall\ \delta \in \R^{+},\, \exists \ x \in \R,\, 
		                    \neg (0 < | x-a | < \delta \implies | f(x) - L | < \epsilon.)\\
		\exists\, \epsilon \in \R^{+},\, \forall\ \delta \in \R^{+},\, \exists \ x \in \R,\, 
		                    \neg (\neg(0 < | x-a | < \delta) \lor | f(x) - L | < \epsilon.)\\
		\exists\, \epsilon \in \R^{+},\, \forall\ \delta \in \R^{+},\, \exists \ x \in \R,\, 
				                    0 < | x-a | < \delta) \land  \neg(| f(x) - L | < \epsilon.)\\
			\exists\, \epsilon \in \R^{+},\, \forall\ \delta \in \R^{+},\, \exists \ x \in \R,\, 
						                    0 < | x-a | < \delta) \land  | f(x) - L | \geq \epsilon.		                                        		                                        
        
       \end{array}
    $$

    % place solution to question 3 below
	
    \item (a)
    $$ 
      \begin{array}{c|c|c|c|c|c|c}
        P     & Q      & R  & P \lor Q & (P \lor Q) \land R & Q \land R) & P \lor (Q \land R) \\
        \hline
        \True  & \True  & \True     & \True    & \True        & \True  & \True \\
        \True  & \True & \False    & \True    & \False       & \False  & \True \\
        \True & \False  & \True    & \True    & \True        & \False   & \True \\
        \True & \False & \False    & \True   & \False        & \False   & \True \\
		\False  & \True  & \True     & \True    & \True        & \True  & \True \\
        \False  & \True & \False    & \True    & \False       & \False  & \True \\
        \False & \False  & \True    & \False    & \False        & \False   & \False \\
        \False & \False & \False    & \False   & \False        & \False   & \False        
      \end{array} 
    $$
    
    (b)
    
     $$ \footnotesize  \begin{array}{c|c|c|c|c|c|c|c} 
        P     & Q      & R  & P \lor Q & P \implies R & Q \implies R & (P \lor Q) \land (P \implies R) \land (Q \implies R) & [(P \lor Q) \land (P \implies R) \land (Q \implies R)] \implies R \\
                \hline
        \True  & \True  & \True     & \True    & \True        & \True  & \True & \True  \\
        \True  & \True & \False    & \True    & \False       & \False  & \False & \True \\
        \True & \False  & \True    & \True    & \True        & \True   & \True & \True \\
        \True & \False & \False    & \True   & \False        & \True   & \False & \True \\
		\False  & \True  & \True     & \True    & \True        & \True  & \True & \True \\
        \False  & \True & \False    & \True    & \True       & \False  & \False & \True \\
        \False & \False  & \True    & \False    & \True        & \True   & \False & \True \\
        \False & \False & \False    & \False   & \True        & \True   & \False & \True       
      \end{array}
	$$
    % place solution to question 4 below

    \item
    \begin{enumerate}
      \item $\neg\exists x \in D, S(x) \implies C(x) $
      \item $ (S(c) \land S(w)) \implies (C(c) \land C(w))$
      \item $\forall x \in D, (S(x) \land M(x)) \implies C(x)$
      \item $\exists x \in D, S(x) \implies (M(x) \land C(x)) $
      \item $(\exists x \in D, S(x) \land M(x)) \land (\exists x \in D, S(x) \land C(x)) $
      \item $ \forall x \in D, (S(x) \land C(x)) \implies M(x) $
      \item $ (\forall x \in D, S(x) \land \forall y \in D, I(y)) 
      \implies \exists x \in D, L(x,x) $
    \end{enumerate}
\end{enumerate}

\medskip

\noindent
\rule{\textwidth}{.5pt}

\end{document}
